package com.dream.technology.thread;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;

import java.util.concurrent.CountDownLatch;

@Data
@Slf4j
@AllArgsConstructor
public class Myt implements Runnable {
	private CountDownLatch count;

	@Override
	public void run() {
		count.countDown();
		log.info("complateb no:{}", count.getCount());
		try {
			Thread.sleep(1000);
		} catch (InterruptedException e) {
			e.printStackTrace();
		}
	}
}